﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    
    var orderId = $.request("orderId");
    var siteId = $.request("siteId");
    var spaceId = $.request("spaceId");
    var op = $.request("op");
    
    $(function () {

        $("#F_OrderId").val(orderId);
        $("#F_SiteId").val(siteId);
        $("#F_SpaceId").val(spaceId);
        
        if (op == "view") {
            $(".preview").prop("disabled", true);
        }

        //if (!!keyValue) {
            $.ajax({
                url: "/OrderFlowManage/ClientOrder/GetPriceTalksJson",
                data: { orderId: orderId, siteId: siteId, spaceId: spaceId },
                dataType: "json",
                async: false,
                success: function (data) {
                    for (var i in data.rows) {
                        var item = data.rows[i];

                        item.F_ServiceName = JSON.parse(item.F_ServiceName).toString();

                        $("#form1").formSerialize(item);
                        break;
                    }
                    
                }
            });
        //}
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/OrderFlowManage/ClientOrder/SubmitPriceTalksForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().vm.pricetalks.initPriceTalks();
                $.loading(false);
            }
        })
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle"><h4>生成报价单</h4></th>
                <td class="formValue" colspan="5"></td>
            </tr>
            <tr>
                <th class="formTitle">订单号：</th>
                <td class="formValue">
                    <input type="hidden" id="F_SiteId" name="F_SiteId" />
                    <input type="hidden" id="F_SpaceId" name="F_SpaceId" />
                    <input type="hidden" id="F_Units" name="F_Units" value="元" />
                    <input id="F_OrderId" name="F_OrderId" type="text" class="form-control" disabled value="DDH20170927" />
                </td>
                <th class="formTitle">场地名称：</th>
                <td class="formValue">
                    <input id="F_SiteName" name="F_SiteName" type="text" class="form-control" disabled value="国家体育场" />
                </td>
                <th class="formTitle">场地类型：</th>
                <td class="formValue">
                    <input id="F_SiteTypeName" name="F_SiteTypeName" type="text" class="form-control" disabled value="体育场馆" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">活动类型：</th>
                <td class="formValue">
                    <input id="F_ActivityTypeName" name="F_ActivityTypeName" type="text" class="form-control" disabled value="商业发布" />
                </td>
                <th class="formTitle">活动主题：</th>
                <td class="formValue">
                    <input id="F_ActivityTheme" name="F_ActivityTheme" type="text" class="form-control" disabled value="品牌推广" />
                </td>
                <th class="formTitle">活动时间：</th>
                <td class="formValue">
                    <input id="F_ActivityTimes" name="F_ActivityTimes" type="text" class="form-control" disabled value="2017-09-21 到 2017-09-25" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">场地费用(元/天)：</th>
                <td class="formValue">
                    <input id="F_MarketPrice" name="F_MarketPrice" type="text" class="form-control required isFloat preview" value="" />
                </td>
                <th class="formTitle">配套：</th>
                <td class="formValue">
                    <input id="F_ServiceName" name="F_ServiceName" type="text" class="form-control" disabled value="礼品定制、餐饮" />
                </td>
                <th class="formTitle">服务费(元)：</th>
                <td class="formValue">
                    <input id="F_CoverCharge" name="F_CoverCharge" type="text" class="form-control required isFloat preview" value="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">税金(元)：</th>
                <td class="formValue">
                    <input id="F_Taxes" name="F_Taxes" type="text" class="form-control required isFloat preview" value="" />
                </td>
                <th class="formTitle">特俗优惠价(元)：</th>
                <td class="formValue">
                    <input id="F_SalePrice" name="F_SalePrice" type="text" class="form-control required isFloat preview" value="" />
                </td>
                <th class="formTitle">押金(元)：</th>
                <td class="formValue">
                    <input id="F_CashPledge" name="F_CashPledge" type="text" class="form-control required isFloat preview" value="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">总计：</th>
                <td class="formValue">
                    <input id="F_TotalPrice" name="F_TotalPrice" type="text" class="form-control required isFloat preview" value="350000" />
                </td>
                <th class="formTitle">etc：</th>
                <td class="formValue" colspan="3">
                    <input id="F_ETC" name="F_ETC" type="text" class="form-control preview" value="" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">备注：</th>
                <td class="formValue" colspan="5">
                    <textarea id="F_Remark" name="F_Remark" rows="4" class="form-control preview" style="width:98%;"></textarea>
                </td>
            </tr>
        </table>
    </div>
</form>


